﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using PadnugRepositoryInterfaces;
using PadnugRepository;
using padnug.Domain;

namespace PadnugService
{
    public class PadnugProfileServce : IPadnugProfileService
    {
        private IPadnugProfileRepository _profileRepository;

        public PadnugProfileServce(IPadnugProfileRepository profileRepository)
        {
            _profileRepository = profileRepository;
        }

        #region IPadnugProfileService Members

        public PadnugUserProfile FetchProfileData(string userName, string applicationName, bool isAnonymous)
        {
            return _profileRepository.FetchProfileData(userName, applicationName, isAnonymous);
        }

        public void SaveProfileData(string userName, string applicationName, bool isAnonymous, PadnugUserProfile data)
        {
            _profileRepository.SaveProfileData(userName, applicationName, isAnonymous, data);
        }

        #endregion
    }

    public interface IPadnugProfileService
    {
        PadnugUserProfile FetchProfileData(string userName, string applicationName, bool isAnonymous);
        void SaveProfileData(string userName, string applicationName, bool isAnonymous, PadnugUserProfile data);
    }
}
